package com.timepies.persistence;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBhelper extends SQLiteOpenHelper {

	public DBhelper(Context context) {
		super(context, DatabaseStrings.DBNAME, null, DatabaseStrings.DBVERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		String q = "CREATE TABLE " + DatabaseStrings.TBL_NAME
				+ " ( _id INTEGER PRIMARY KEY AUTOINCREMENT,"
				+ DatabaseStrings.FIELD_SUBJECT + " TEXT,"
				+ DatabaseStrings.FIELD_TEXT + " TEXT,"
				+ DatabaseStrings.FIELD_DATE + " TEXT)";
		db.execSQL(q);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
	}

}